#include <iostream>
using namespace std;
const int n=11;
int main()
{int i,j,a[n][n];
 for(i=1;i<n;i++)
    {a[i][1]=1;
     a[i][i]=1;
     }
 for ( i=3;i<n;i++)
    {for (j=2;j<=i-1;j++)
      a[i][j]=a[i-1][j-1]+a[i-1][j];
     }
 for(i=1;i<n;i++)
   {for(j=1;j<=i;j++)
      cout<<a[i][j]<<" ";
      cout<<endl;
    }
 system ("pause");
 return 0;
}
    
